I have a KStep to run my stepper motors, and a third party servo driver for my spindle. I am able to get the servo to drive very well with encoder feedback on the step response screens. The problem arises when I try to make my .INT program to run both the servo and the KStep.
There is a line in the KStep example program that when it is included the servo driver stops working. Here it is, and I am not exactly sure what it is doing.
FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80; // set polarity and pulse length to 4us
When I comment this out the servo seems to work just fine, and the KStep also seems to work. Am I okay in simply removing this?
Thanks,
Scott
Group: DynoMotion
Message: 12163
From: Tom Kerekes
Date: 8/26/2015
Subject: Re: Polarity and Pulse Length
Hi Scott,
That FPGA command is changing the default pulse length from ~2us to 3.8us and inverting the pulse polarity. It is explained here:
Seems strange that the drive would not work at all with a longer inverted pulse. What type of drives is it? How is it wired? How is the Spindle Axis configured?
Regards
TK
Group: DynoMotion
Message: 12300
From: cnc_machines
Date: 9/23/2015
Subject: Re: Polarity and Pulse Length
Tom,
I ended up just removing the line of code (FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80; // set polarity and pulse length to 4us) because everything seems to work okay... or maybe not. I am now getting following errors from my steppers driven from the KStep.
Could it be that the KStep is not happy with the default 2us pulse width setting? If this shouldn't matter I will keep trying to track down my following errors elsewhere.
Here is the servo I am using for the spindle. I am using step and direction and wired it according to open collector mode. Seems to work very well until that line of code is put into the program.
PRONET - Wide selection of PRONET products. Low online prices for high quality PRONET products in stock with great customer support. Great for both low and high volume PRONET requirements.